The present invention relates to a transaction processing system for executing a series of transactions in accordance with a workflow, and more particularly to a transaction processing system for executing effective error recovery processing when an error occurs during the execution of a transaction.
In a trip reservation system requiring the reservation of hotels and air tickets or in a system requiring a remittance of money between a plurality of banks, it is necessary to execute transaction processing by accessing a plurality of servers in response to a request from a channel. The transaction processing means the execution of a program having properties of atomicity, consistency, isolation and durability. Such transaction processing was reviewed, for example, in xe2x80x9cPrinciples of Transaction Processingxe2x80x9d, Morgan Kaufmann Publishers, Inc., pp. 8-14. In this specification, systems which transmit a request message to a workflow controlling system are collectively called a xe2x80x9cchannelxe2x80x9d hereinafter.
While a series of processing is executed for one transaction, it is necessary to lock corresponding data until the transaction is terminated at each server. Therefore, other processing is requested to stand by for a long time, which may pose a problem of poor system performance. To solve this, generally, a series of processing is divided into transactions on the server access unit and each transaction is executed in accordance with a workflow constituted of a plurality of transactions.
In such a system, if an error occurs during the execution of a transaction in accordance with a workflow, it is necessary to execute error recovery processing for aborting a series of transactions which has been executed until the error occurs. To this end, the contents of execution of each transaction have been enqueued conventionally in a queue as journal information, and when an error occurs, each piece of the journal information is dequeued starting from the last of the queue. Such a system was reviewed, for example, in xe2x80x9cPrinciples of Transaction Processingxe2x80x9d, Morgan Kaufmann Publishers, Inc., pp. 120-121.
In the conventional system described above, if a transaction accessing a server is aborted by compensation transaction processing and before this abortion another transaction accesses the same server, then the other transaction is influenced by the results of the first transaction which is later aborted. For example, in the case of a hotel reservation transaction, a reservation cannot be made because of no empty room until an empty room is made by any cancel. It is desired therefore that the error recovery processing time be as short as possible.
With the conventional system, even if transactions executed in parallel by split are to be recovered, compensation transactions are executed one at a time. It takes therefore a long time to complete the error recovery processing for a series of transactions.
It is an object of the present invention to solve the above-described problems and improve the efficiency of error recovery processing.
It is another object of the present invention to provide techniques capable of efficiently executing error recovery processing even if a transaction processing system receives request messages at the same time from a plurality of channels.
According to the present invention, in a transaction processing system for executing a series of transactions in accordance with a workflow, an error recovery flow for performing error recovery processing or journal information representative of the contents of an executed transaction are registered when the transaction is executed. When an error occurs while the transaction is executed, a series of compensation processing is executed in parallel in accordance with the registered error recovery flow or journal information.
In the transaction processing system of this invention, a transaction is executed in accordance with the workflow, and the compensation processing is registered as the error recovery flow when the transaction is executed, the compensation processing executing error recovery processing when an error occurs while the transaction is executed.
When a split process is executed in accordance with the workflow, a join process is registered in the error recovery flow in correspondence with the split process. When the join process is executed in accordance with the workflow, the split process is registered in the error recovery flow in correspondence with the join process.
When an error occurs while the transaction is executed, a series of compensation processing is executed in accordance with the registered error recovery flow. Since the error recovery flow is generated in correspondence with the normal processing flow in the workflow, the portion executed in parallel by the split process during the transaction execution is executed in parallel also for the compensation processing. The compensation processing can therefore be executed at high speed.
In the transaction processing system of this invention, the transaction is executed in accordance with the workflow, and the journal information representative of the contents of an executed transaction is registered.
When an error occurs while a transaction is executed, the registered journal information is acquired and the compensation transaction is executed in parallel in accordance with the contents of each transaction registered in the journal information. In this case, the compensation transaction may be executed in parallel in accordance with the path of the workflow or the target destination. Since the compensation transaction can be executed in parallel in accordance with the journal information, the compensation processing can be executed at high speed.
As above, according to the transaction processing system of this invention, since the error recovery processing is executed in parallel for each path generated by the split process in the normal processing flow, the efficiency of the error recovery processing can be improved.